package la.bbs558.exception;

import cn.hutool.core.util.StrUtil;
import la.bbs558.controller.base.CodeEnum;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class MsgException extends MyException{

    private CodeEnum codeEnum = CodeEnum.SYSTEM;
    public MsgException(String message) {
        super(message);
    }

    public MsgException(CodeEnum codeEnum, String msg) {
        super(msg);
        this.codeEnum = codeEnum;
    }

    public MsgException(String message, Throwable cause) {
        super(message, cause);
    }

    public MsgException(CharSequence template, Object... params) {
        super(StrUtil.format(template,params));
    }
}